﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;

public partial class Pages_ListViewFlower : System.Web.UI.UserControl
{
    BLLSanPham bllSanPham;
    protected void Page_Load(object sender, EventArgs e)
    {
        string MaDM = Request.QueryString["MaDM"];
        bllSanPham = new BLLSanPham();
        if (!IsPostBack)
        {
            if (MaDM == null)
            {
                ListView1.DataSource = bllSanPham.iSanPham.SelectTopSanPham(1);
                ListView1.DataBind();
            }
            else
            {
                ListView1.DataSource = bllSanPham.iSanPham.selectSPbyDanhMuc(MaDM.Trim());
                ListView1.DataBind();
            }
       }
    }

    [WebMethod]
    public static string Test()
    {
        return "<b> Nguyen Cong Tam </b>";
    }


    
    //private void dofunctionjavascript(string script)
    //{
    //    Label lbl = new Label();
    //    lbl.Text = "<script language='javascript'>" + Environment.NewLine + " " + script + "</script>";
    //     Page.Controls.Add(lbl);
    //}

}